{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-1.        , -0.98994975, -0.9798995 , -0.96984925, -0.95979899,\n",
       "       -0.94974874, -0.93969849, -0.92964824, -0.91959799, -0.90954774,\n",
       "       -0.89949749, -0.88944724, -0.87939698, -0.86934673, -0.85929648,\n",
       "       -0.84924623, -0.83919598, -0.82914573, -0.81909548, -0.80904523,\n",
       "       -0.79899497, -0.78894472, -0.77889447, -0.76884422, -0.75879397,\n",
       "       -0.74874372, -0.73869347, -0.72864322, -0.71859296, -0.70854271,\n",
       "       -0.69849246, -0.68844221, -0.67839196, -0.66834171, -0.65829146,\n",
       "       -0.64824121, -0.63819095, -0.6281407 , -0.61809045, -0.6080402 ,\n",
       "       -0.59798995, -0.5879397 , -0.57788945, -0.5678392 , -0.55778894,\n",
       "       -0.54773869, -0.53768844, -0.52763819, -0.51758794, -0.50753769,\n",
       "       -0.49748744, -0.48743719, -0.47738693, -0.46733668, -0.45728643,\n",
       "       -0.44723618, -0.43718593, -0.42713568, -0.41708543, -0.40703518,\n",
       "       -0.39698492, -0.38693467, -0.37688442, -0.36683417, -0.35678392,\n",
       "       -0.34673367, -0.33668342, -0.32663317, -0.31658291, -0.30653266,\n",
       "       -0.29648241, -0.28643216, -0.27638191, -0.26633166, -0.25628141,\n",
       "       -0.24623116, -0.2361809 , -0.22613065, -0.2160804 , -0.20603015,\n",
       "       -0.1959799 , -0.18592965, -0.1758794 , -0.16582915, -0.15577889,\n",
       "       -0.14572864, -0.13567839, -0.12562814, -0.11557789, -0.10552764,\n",
       "       -0.09547739, -0.08542714, -0.07537688, -0.06532663, -0.05527638,\n",
       "       -0.04522613, -0.03517588, -0.02512563, -0.01507538, -0.00502513,\n",
       "        0.00502513,  0.01507538,  0.02512563,  0.03517588,  0.04522613,\n",
       "        0.05527638,  0.06532663,  0.07537688,  0.08542714,  0.09547739,\n",
       "        0.10552764,  0.11557789,  0.12562814,  0.13567839,  0.14572864,\n",
       "        0.15577889,  0.16582915,  0.1758794 ,  0.18592965,  0.1959799 ,\n",
       "        0.20603015,  0.2160804 ,  0.22613065,  0.2361809 ,  0.24623116,\n",
       "        0.25628141,  0.26633166,  0.27638191,  0.28643216,  0.29648241,\n",
       "        0.30653266,  0.31658291,  0.32663317,  0.33668342,  0.34673367,\n",
       "        0.35678392,  0.36683417,  0.37688442,  0.38693467,  0.39698492,\n",
       "        0.40703518,  0.41708543,  0.42713568,  0.43718593,  0.44723618,\n",
       "        0.45728643,  0.46733668,  0.47738693,  0.48743719,  0.49748744,\n",
       "        0.50753769,  0.51758794,  0.52763819,  0.53768844,  0.54773869,\n",
       "        0.55778894,  0.5678392 ,  0.57788945,  0.5879397 ,  0.59798995,\n",
       "        0.6080402 ,  0.61809045,  0.6281407 ,  0.63819095,  0.64824121,\n",
       "        0.65829146,  0.66834171,  0.67839196,  0.68844221,  0.69849246,\n",
       "        0.70854271,  0.71859296,  0.72864322,  0.73869347,  0.74874372,\n",
       "        0.75879397,  0.76884422,  0.77889447,  0.78894472,  0.79899497,\n",
       "        0.80904523,  0.81909548,  0.82914573,  0.83919598,  0.84924623,\n",
       "        0.85929648,  0.86934673,  0.87939698,  0.88944724,  0.89949749,\n",
       "        0.90954774,  0.91959799,  0.92964824,  0.93969849,  0.94974874,\n",
       "        0.95979899,  0.96984925,  0.9798995 ,  0.98994975,  1.        ])"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "import numpy as np\n",
    "np.random.seed(123)\n",
    "x = np.linspace(-1, 1, 200)\n",
    "x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-0.49748744,  0.27638191, -0.6281407 ,  0.49748744, -0.80904523,\n",
       "        0.04522613,  0.79899497, -0.46733668,  0.6281407 ,  0.5879397 ,\n",
       "       -0.1758794 ,  0.85929648,  0.82914573,  0.89949749,  0.08542714,\n",
       "       -0.68844221, -0.95979899,  0.78894472,  0.2160804 , -0.79899497,\n",
       "        0.72864322, -0.11557789,  0.66834171,  0.70854271,  0.28643216,\n",
       "       -0.27638191,  0.80904523, -0.73869347,  0.44723618, -0.47738693,\n",
       "       -0.20603015, -0.06532663,  0.83919598,  0.1959799 , -0.14572864,\n",
       "        0.33668342,  0.84924623,  0.39698492, -0.04522613,  0.40703518,\n",
       "       -0.75879397,  0.50753769,  0.14572864, -0.66834171, -0.76884422,\n",
       "        0.71859296, -0.5879397 ,  0.00502513,  0.52763819, -0.28643216,\n",
       "        0.86934673,  0.10552764, -0.57788945,  0.20603015,  0.91959799,\n",
       "        0.61809045, -0.89949749,  0.75879397, -0.22613065, -0.37688442,\n",
       "       -0.18592965,  0.07537688,  0.12562814,  0.45728643, -0.91959799,\n",
       "        0.51758794,  0.54773869, -0.09547739, -0.63819095, -0.36683417,\n",
       "       -0.71859296, -0.86934673,  0.59798995, -0.1959799 ,  0.5678392 ,\n",
       "       -0.55778894,  0.92964824,  0.57788945,  0.30653266, -0.39698492,\n",
       "       -0.92964824, -0.69849246,  0.77889447,  0.32663317, -0.70854271,\n",
       "       -0.64824121, -1.        ,  0.88944724, -0.54773869,  0.37688442,\n",
       "       -0.59798995, -0.40703518,  0.47738693, -0.53768844,  0.25628141,\n",
       "       -0.94974874, -0.83919598,  0.69849246, -0.34673367, -0.25628141,\n",
       "       -0.38693467,  0.95979899, -0.61809045, -0.72864322, -0.45728643,\n",
       "        0.43718593,  0.48743719,  0.81909548,  0.63819095,  0.42713568,\n",
       "       -0.12562814, -0.90954774, -0.93969849,  0.6080402 ,  0.16582915,\n",
       "        0.22613065,  0.65829146,  0.96984925,  0.67839196,  0.41708543,\n",
       "       -0.10552764, -0.78894472, -0.88944724, -0.32663317, -0.96984925,\n",
       "       -0.13567839,  0.68844221, -0.08542714,  0.36683417, -0.51758794,\n",
       "        0.1758794 , -0.48743719, -0.98994975, -0.81909548, -0.87939698,\n",
       "        0.76884422, -0.43718593, -0.74874372,  0.01507538, -0.5678392 ,\n",
       "        0.29648241,  0.03517588, -0.85929648,  0.34673367,  0.15577889,\n",
       "        1.        , -0.29648241, -0.84924623,  0.46733668, -0.77889447,\n",
       "        0.38693467, -0.41708543, -0.24623116, -0.35678392, -0.30653266,\n",
       "        0.93969849,  0.31658291, -0.2361809 , -0.65829146,  0.55778894,\n",
       "       -0.05527638,  0.18592965, -0.02512563,  0.02512563, -0.07537688,\n",
       "        0.24623116, -0.00502513,  0.05527638,  0.35678392,  0.87939698,\n",
       "        0.73869347,  0.9798995 , -0.6080402 , -0.15577889, -0.9798995 ,\n",
       "       -0.44723618, -0.50753769, -0.31658291,  0.90954774,  0.64824121,\n",
       "       -0.2160804 ,  0.94974874,  0.53768844,  0.11557789,  0.74874372,\n",
       "       -0.67839196, -0.26633166, -0.52763819,  0.98994975,  0.13567839,\n",
       "       -0.03517588, -0.42713568,  0.2361809 ,  0.06532663, -0.16582915,\n",
       "       -0.82914573, -0.01507538, -0.33668342,  0.26633166,  0.09547739])"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.shuffle(x)\n",
    "x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1.75125628, 2.13819095, 1.68592965, 2.24874372, 1.59547739,\n",
       "       2.02261307, 2.39949749, 1.76633166, 2.31407035, 2.29396985,\n",
       "       1.9120603 , 2.42964824, 2.41457286, 2.44974874, 2.04271357,\n",
       "       1.65577889, 1.5201005 , 2.39447236, 2.1080402 , 1.60050251,\n",
       "       2.36432161, 1.94221106, 2.33417085, 2.35427136, 2.14321608,\n",
       "       1.86180905, 2.40452261, 1.63065327, 2.22361809, 1.76130653,\n",
       "       1.89698492, 1.96733668, 2.41959799, 2.09798995, 1.92713568,\n",
       "       2.16834171, 2.42462312, 2.19849246, 1.97738693, 2.20351759,\n",
       "       1.62060302, 2.25376884, 2.07286432, 1.66582915, 1.61557789,\n",
       "       2.35929648, 1.70603015, 2.00251256, 2.2638191 , 1.85678392,\n",
       "       2.43467337, 2.05276382, 1.71105528, 2.10301508, 2.45979899,\n",
       "       2.30904523, 1.55025126, 2.37939698, 1.88693467, 1.81155779,\n",
       "       1.90703518, 2.03768844, 2.06281407, 2.22864322, 1.54020101,\n",
       "       2.25879397, 2.27386935, 1.95226131, 1.68090452, 1.81658291,\n",
       "       1.64070352, 1.56532663, 2.29899497, 1.90201005, 2.2839196 ,\n",
       "       1.72110553, 2.46482412, 2.28894472, 2.15326633, 1.80150754,\n",
       "       1.53517588, 1.65075377, 2.38944724, 2.16331658, 1.64572864,\n",
       "       1.6758794 , 1.5       , 2.44472362, 1.72613065, 2.18844221,\n",
       "       1.70100503, 1.79648241, 2.23869347, 1.73115578, 2.1281407 ,\n",
       "       1.52512563, 1.58040201, 2.34924623, 1.82663317, 1.8718593 ,\n",
       "       1.80653266, 2.4798995 , 1.69095477, 1.63567839, 1.77135678,\n",
       "       2.21859296, 2.24371859, 2.40954774, 2.31909548, 2.21356784,\n",
       "       1.93718593, 1.54522613, 1.53015075, 2.3040201 , 2.08291457,\n",
       "       2.11306533, 2.32914573, 2.48492462, 2.33919598, 2.20854271,\n",
       "       1.94723618, 1.60552764, 1.55527638, 1.83668342, 1.51507538,\n",
       "       1.9321608 , 2.34422111, 1.95728643, 2.18341709, 1.74120603,\n",
       "       2.0879397 , 1.75628141, 1.50502513, 1.59045226, 1.56030151,\n",
       "       2.38442211, 1.78140704, 1.62562814, 2.00753769, 1.7160804 ,\n",
       "       2.14824121, 2.01758794, 1.57035176, 2.17336683, 2.07788945,\n",
       "       2.5       , 1.85175879, 1.57537688, 2.23366834, 1.61055276,\n",
       "       2.19346734, 1.79145729, 1.87688442, 1.82160804, 1.84673367,\n",
       "       2.46984925, 2.15829146, 1.88190955, 1.67085427, 2.27889447,\n",
       "       1.97236181, 2.09296482, 1.98743719, 2.01256281, 1.96231156,\n",
       "       2.12311558, 1.99748744, 2.02763819, 2.17839196, 2.43969849,\n",
       "       2.36934673, 2.48994975, 1.6959799 , 1.92211055, 1.51005025,\n",
       "       1.77638191, 1.74623116, 1.84170854, 2.45477387, 2.3241206 ,\n",
       "       1.8919598 , 2.47487437, 2.26884422, 2.05778894, 2.37437186,\n",
       "       1.66080402, 1.86683417, 1.7361809 , 2.49497487, 2.0678392 ,\n",
       "       1.98241206, 1.78643216, 2.11809045, 2.03266332, 1.91708543,\n",
       "       1.58542714, 1.99246231, 1.83165829, 2.13316583, 2.04773869])"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y = 0.5 * x + 2\n",
    "y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAT1ElEQVR4nO3df7BcdXnH8fcjBIwDNWAshcA10MFYqy3YqzKlU0AdIowCTm3FKgWrk2qtM04tgz86/uiPqTYdFYdamkGkVAZsAWNstRFFBp0SLBA0kkwgwohcUhE0QjVFkKd/7Ln2cHP33t29Z3fPOft+zWSy95zv7j6cXT73yfd+v3sjM5EkNd9Txl2AJKkaBroktYSBLkktYaBLUksY6JLUEvuP64lXrlyZq1evHtfTS1Ij3XrrrQ9m5jPnOze2QF+9ejW33HLLuJ5ekhopIr7T7ZxTLpLUEga6JLWEgS5JLWGgS1JLGOiS1BIGuiS1hIEuSS1hoEtSS4xtY5EkTYqNW2dYv3kn9+/ZyxErlnP+2jWcdfyqyp/HQJekIfrzjdu4Ysu9zP4qoZk9e3nXtdsAKg91p1w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ZrKX2RmRkTXtZ/Fd+HnA5tLh99FJ9gOoLMu9QLgL0ZY17MycyYijgGuj4htdIJrYBVfr38Gzs3MJ4rDA1+vtomI1wPTwEmlw/u8npn57fkfoXKfA67MzEcj4o/o/OvmJSN67sWcDVydmT8rHRvntRq6WgR6Zr5siQ8xAxxV+vrI4thDdP5ps3/Rbc0eX1JNEfG9iDg8M3cXAfTAAg/1e8BnMvOx0mPPdquPRsQngT/rpaaq6srMmeLvuyPiBuB44BoGvFZV1RURvwD8O51v5FtKjz3w9Zqj2/tkvjH3RcT+wNPpvI96ue+genrsiHgZnW+QJ2Xmo7PHu7yeVYTUonVl5kOlLy+h8/OS2fuePOe+N4yippKzgbeWDwzxWi2mW92VXqe2TLn8F3BsdFZpHEDnhdyUnZ86fIXOHDbAuUAVHf+m4rF6ecx95vCKUJudtz4LmPcn48OoKyIOmZ2yiIiVwInA9iFeq17rOgD4DJ15xqvnnKvqes37Plmg1lcD1xfXZhNwdnRWwRwNHAt8fcA6+q4rIo4H/hE4IzMfKB2f9/UcYV2Hl748A9hR3N4MnFrUdwhwKk/+V+rQairqeg6dHzLeVDo2zGu1mE3AHxSrXU4AflQ0KtVep2H8xLfKP8Cr6MwrPQp8D9hcHD8C+Hxp3OnAnXS+276ndPwYOv/j7QL+FTiwgpqeAXwZuAv4EnBocXwauKQ0bjWd78BPmXP/64FtdILpU8BBFV2rResCfrN47m8Uf79xmNeqj7peDzwG3F76c1zV12u+9wmd6ZszittPLf7bdxXX4pjSfd9T3G8ncFrF7/PF6vpS8f6fvTabFns9R1TX3wB3FM//FeA5pfv+YXEddwFvGFVNxdfvBz44535Du1Z0mrbdxXv4Pjo/53gz8ObifAB/X9S8jdKKvSqvk1v/Jakl2jLlIkkTz0CXpJYw0CWpJQx0SWoJA12SWsJAl6SWMNAlqSX+D02rvZLcml7PAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n",
    "\n",
    "plt.scatter(x, y)\n",
    "# 发现其实是一条直线（从数学数据上来看也是直线）\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3df5TddX3n8ed7Jhe4EZcJJduVkRj0KKwshci0chrPVtIesLJiWrBobdVu97B23R6hLsfYX2DbPcZmq56ebstyrKVdPZhqaBqlbbRNrFssdBMyGANEQSoysCU1DNpkCDeZ9/5x73f4zp3P5/vj3u+9c++d1+OcHGa+93u/9+Od8X0/8/6+P++PuTsiIjL8xpZ7ACIiUg0FdBGREaGALiIyIhTQRURGhAK6iMiIWLVcL3zOOef4+vXrl+vlRUSG0v79+//Z3deGHlu2gL5+/Xr27du3XC8vIjKUzOxbsceUchERGRG5Ad3MzjOzvWb2oJkdMrP3Rs57vZlNt8752+qHKiIiWYqkXE4C73P3+83sxcB+M/uiuz+YnGBmE8DvA29w98fN7F/3aLwiIhKRO0N396fc/f7W198DHgIm2077aeAud3+8dd7TVQ9URESylcqhm9l6YANwX9tDrwLWmNmXzGy/mb0j8vwbzGyfme07cuRIJ+MVEZGIwgHdzM4EdgA3uvt32x5eBVwGXA1cBfyamb2q/Rrufru7T7n71Nq1waobERHpUKGyRTOr0Qzmn3L3uwKnPAF8x92PAcfM7MvAJcDXKxupiIhkKlLlYsAfAg+5+0cip/058DozW2Vmq4HX0sy1i4hInxSZoW8EfhY4aGbTrWO/DKwDcPfb3P0hM/sr4KvAPPBxd/9aLwYs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Wv/9ppl9CdgA7KDD96qqcZnZvwLupvlBfm/q2h2/X21ivyehc54ws1XAWTR/j4o8t1OFrm1mP0bzA/JH3P1Ecjzy86wiSOWOy92/k/r24zTvlyTPfX3bc7/UjzGlvBV4T/pAD9+rPLFxV/o+jUrK5f8Cr7RmlcZpNH+Qu7x512EvzRw2wDuBKmb8u1rXKnLNJTm8VlBL8tabgeCd8V6My8zWJCkLMzsH2Ag82MP3qui4TgP+jGae8bNtj1X1fgV/TzLGeh2wp/Xe7ALeas0qmPOBVwL/0OE4So/LzDYA/wu4xt2fTh0P/jz7OK6XpL69Bnio9fVu4MrW+NYAV7L4r9Sejak1rgtp3mT8+9SxXr5XeXYB72hVu1wOPNuaqFT7PvXijm+V/4CfoJlXOgH8E7C7dfxc4C9S570R+DrNT9tfSR1/Oc3/4z0CfAY4vYIxfR/wN8A3gL8Gzm4dnwI+njpvPc1P4LG25+8BDtIMTJ8EzqzovcodF/DDrdd+oPXfn+/le1ViXD8DNIDp1L9Lq36/Qr8nNNM317S+PqP1v/2R1nvx8tRzf6X1vMPAj1f8e543rr9u/f4n782uvJ9nn8b1IeBQ6/X3AhemnvsfW+/jI8DP9WtMre9vBba2Pa9n7xXNSdtTrd/hJ2je53g38O7W4wb8z9aYD5Kq2KvyfdLSfxGRETEqKRcRkRVPAV1EZEQooIuIjAgFdBGREaGALiIyIhTQRURGhAK6iMiI+P8LodbOtauSpQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 需要添加一些随机，np.random.normal是正态偏差值\n",
    "y = 0.5 * x + 2 + np.random.normal(0, 0.05, (200, ))\n",
    "plt.scatter(x, y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((160,), (160,))"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 手动切分训练机和测试集\n",
    "x_train, y_train = x[:160], y[:160]\n",
    "x_test, y_test = x[160:], y[160:]\n",
    "x_train.shape, y_train.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Model: \"sequential_4\"\n",
      "_________________________________________________________________\n",
      "Layer (type)                 Output Shape              Param #   \n",
      "=================================================================\n",
      "dense_4 (Dense)              (None, 1)                 2         \n",
      "=================================================================\n",
      "Total params: 2\n",
      "Trainable params: 2\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/wang/.pyenv/versions/3.6.7/lib/python3.6/site-packages/ipykernel_launcher.py:4: UserWarning: Update your `Dense` call to the Keras 2 API: `Dense(input_dim=1, units=1)`\n",
      "  after removing the cwd from sys.path.\n"
     ]
    }
   ],
   "source": [
    "from keras.models import Sequential\n",
    "model = Sequential()\n",
    "from keras.layers import Dense\n",
    "model.add(Dense(output_dim=1, input_dim=1))\n",
    "model.summary()\n",
    "model.compile(loss='mse', optimizer='sgd')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/100\n",
      "160/160 [==============================] - 0s 450us/step - loss: 3.2858\n",
      "Epoch 2/100\n",
      "160/160 [==============================] - 0s 53us/step - loss: 1.7814\n",
      "Epoch 3/100\n",
      "160/160 [==============================] - 0s 55us/step - loss: 0.9825\n",
      "Epoch 4/100\n",
      "160/160 [==============================] - 0s 51us/step - loss: 0.5536\n",
      "Epoch 5/100\n",
      "160/160 [==============================] - 0s 55us/step - loss: 0.3209\n",
      "Epoch 6/100\n",
      "160/160 [==============================] - 0s 52us/step - loss: 0.1931\n",
      "Epoch 7/100\n",
      "160/160 [==============================] - 0s 60us/step - loss: 0.1215\n",
      "Epoch 8/100\n",
      "160/160 [==============================] - 0s 52us/step - loss: 0.0800\n",
      "Epoch 9/100\n",
      "160/160 [==============================] - 0s 62us/step - loss: 0.0553\n",
      "Epoch 10/100\n",
      "160/160 [==============================] - 0s 55us/step - loss: 0.0398\n",
      "Epoch 11/100\n",
      "160/160 [==============================] - 0s 54us/step - loss: 0.0297\n",
      "Epoch 12/100\n",
      "160/160 [==============================] - 0s 55us/step - loss: 0.0229\n",
      "Epoch 13/100\n",
      "160/160 [==============================] - 0s 51us/step - loss: 0.0181\n",
      "Epoch 14/100\n",
      "160/160 [==============================] - 0s 48us/step - loss: 0.0145\n",
      "Epoch 15/100\n",
      "160/160 [==============================] - 0s 57us/step - loss: 0.0119\n",
      "Epoch 16/100\n",
      "160/160 [==============================] - 0s 62us/step - loss: 0.0099\n",
      "Epoch 17/100\n",
      "160/160 [==============================] - 0s 54us/step - loss: 0.0083\n",
      "Epoch 18/100\n",
      "160/160 [==============================] - 0s 61us/step - loss: 0.0071\n",
      "Epoch 19/100\n",
      "160/160 [==============================] - 0s 65us/step - loss: 0.0061\n",
      "Epoch 20/100\n",
      "160/160 [==============================] - 0s 51us/step - loss: 0.0054\n",
      "Epoch 21/100\n",
      "160/160 [==============================] - 0s 60us/step - loss: 0.0048\n",
      "Epoch 22/100\n",
      "160/160 [==============================] - 0s 55us/step - loss: 0.0043\n",
      "Epoch 23/100\n",
      "160/160 [==============================] - 0s 62us/step - loss: 0.0039\n",
      "Epoch 24/100\n",
      "160/160 [==============================] - 0s 55us/step - loss: 0.0036\n",
      "Epoch 25/100\n",
      "160/160 [==============================] - 0s 63us/step - loss: 0.0034\n",
      "Epoch 26/100\n",
      "160/160 [==============================] - 0s 58us/step - loss: 0.0032\n",
      "Epoch 27/100\n",
      "160/160 [==============================] - 0s 52us/step - loss: 0.0030\n",
      "Epoch 28/100\n",
      "160/160 [==============================] - 0s 59us/step - loss: 0.0029\n",
      "Epoch 29/100\n",
      "160/160 [==============================] - 0s 55us/step - loss: 0.0028\n",
      "Epoch 30/100\n",
      "160/160 [==============================] - 0s 50us/step - loss: 0.0028\n",
      "Epoch 31/100\n",
      "160/160 [==============================] - 0s 56us/step - loss: 0.0027\n",
      "Epoch 32/100\n",
      "160/160 [==============================] - 0s 58us/step - loss: 0.0026\n",
      "Epoch 33/100\n",
      "160/160 [==============================] - 0s 62us/step - loss: 0.0026\n",
      "Epoch 34/100\n",
      "160/160 [==============================] - 0s 58us/step - loss: 0.0026\n",
      "Epoch 35/100\n",
      "160/160 [==============================] - 0s 57us/step - loss: 0.0026\n",
      "Epoch 36/100\n",
      "160/160 [==============================] - 0s 59us/step - loss: 0.0025\n",
      "Epoch 37/100\n",
      "160/160 [==============================] - 0s 50us/step - loss: 0.0025\n",
      "Epoch 38/100\n",
      "160/160 [==============================] - 0s 50us/step - loss: 0.0025\n",
      "Epoch 39/100\n",
      "160/160 [==============================] - 0s 56us/step - loss: 0.0025\n",
      "Epoch 40/100\n",
      "160/160 [==============================] - 0s 48us/step - loss: 0.0025\n",
      "Epoch 41/100\n",
      "160/160 [==============================] - 0s 61us/step - loss: 0.0025\n",
      "Epoch 42/100\n",
      "160/160 [==============================] - 0s 60us/step - loss: 0.0025\n",
      "Epoch 43/100\n",
      "160/160 [==============================] - 0s 61us/step - loss: 0.0025\n",
      "Epoch 44/100\n",
      "160/160 [==============================] - 0s 52us/step - loss: 0.0025\n",
      "Epoch 45/100\n",
      "160/160 [==============================] - 0s 57us/step - loss: 0.0025\n",
      "Epoch 46/100\n",
      "160/160 [==============================] - 0s 53us/step - loss: 0.0025\n",
      "Epoch 47/100\n",
      "160/160 [==============================] - 0s 64us/step - loss: 0.0025\n",
      "Epoch 48/100\n",
      "160/160 [==============================] - 0s 54us/step - loss: 0.0025\n",
      "Epoch 49/100\n",
      "160/160 [==============================] - 0s 59us/step - loss: 0.0025\n",
      "Epoch 50/100\n",
      "160/160 [==============================] - 0s 63us/step - loss: 0.0025\n",
      "Epoch 51/100\n",
      "160/160 [==============================] - 0s 51us/step - loss: 0.0025\n",
      "Epoch 52/100\n",
      "160/160 [==============================] - 0s 72us/step - loss: 0.0025\n",
      "Epoch 53/100\n",
      "160/160 [==============================] - 0s 58us/step - loss: 0.0025\n",
      "Epoch 54/100\n",
      "160/160 [==============================] - 0s 80us/step - loss: 0.0025\n",
      "Epoch 55/100\n",
      "160/160 [==============================] - 0s 72us/step - loss: 0.0025\n",
      "Epoch 56/100\n",
      "160/160 [==============================] - 0s 69us/step - loss: 0.0025\n",
      "Epoch 57/100\n",
      "160/160 [==============================] - 0s 67us/step - loss: 0.0025\n",
      "Epoch 58/100\n",
      "160/160 [==============================] - 0s 67us/step - loss: 0.0025\n",
      "Epoch 59/100\n",
      "160/160 [==============================] - 0s 66us/step - loss: 0.0025\n",
      "Epoch 60/100\n",
      "160/160 [==============================] - 0s 59us/step - loss: 0.0025\n",
      "Epoch 61/100\n",
      "160/160 [==============================] - 0s 61us/step - loss: 0.0025\n",
      "Epoch 62/100\n",
      "160/160 [==============================] - 0s 60us/step - loss: 0.0025\n",
      "Epoch 63/100\n",
      "160/160 [==============================] - 0s 57us/step - loss: 0.0025\n",
      "Epoch 64/100\n",
      "160/160 [==============================] - 0s 60us/step - loss: 0.0025\n",
      "Epoch 65/100\n",
      "160/160 [==============================] - 0s 67us/step - loss: 0.0025\n",
      "Epoch 66/100\n",
      "160/160 [==============================] - 0s 62us/step - loss: 0.0025\n",
      "Epoch 67/100\n",
      "160/160 [==============================] - 0s 75us/step - loss: 0.0025\n",
      "Epoch 68/100\n",
      "160/160 [==============================] - 0s 61us/step - loss: 0.0025\n",
      "Epoch 69/100\n",
      "160/160 [==============================] - 0s 59us/step - loss: 0.0025\n",
      "Epoch 70/100\n",
      "160/160 [==============================] - 0s 61us/step - loss: 0.0025\n",
      "Epoch 71/100\n",
      "160/160 [==============================] - 0s 66us/step - loss: 0.0025\n",
      "Epoch 72/100\n",
      "160/160 [==============================] - 0s 65us/step - loss: 0.0025\n",
      "Epoch 73/100\n",
      "160/160 [==============================] - 0s 56us/step - loss: 0.0025\n",
      "Epoch 74/100\n",
      "160/160 [==============================] - 0s 61us/step - loss: 0.0025\n",
      "Epoch 75/100\n",
      "160/160 [==============================] - 0s 61us/step - loss: 0.0025\n",
      "Epoch 76/100\n",
      "160/160 [==============================] - 0s 56us/step - loss: 0.0025\n",
      "Epoch 77/100\n",
      "160/160 [==============================] - 0s 62us/step - loss: 0.0025\n",
      "Epoch 78/100\n",
      "160/160 [==============================] - 0s 54us/step - loss: 0.0025\n",
      "Epoch 79/100\n",
      "160/160 [==============================] - 0s 58us/step - loss: 0.0025\n",
      "Epoch 80/100\n",
      "160/160 [==============================] - 0s 67us/step - loss: 0.0025\n",
      "Epoch 81/100\n",
      "160/160 [==============================] - 0s 59us/step - loss: 0.0025\n",
      "Epoch 82/100\n",
      "160/160 [==============================] - 0s 61us/step - loss: 0.0025\n",
      "Epoch 83/100\n",
      "160/160 [==============================] - 0s 61us/step - loss: 0.0025\n",
      "Epoch 84/100\n",
      "160/160 [==============================] - 0s 64us/step - loss: 0.0025\n",
      "Epoch 85/100\n",
      "160/160 [==============================] - 0s 60us/step - loss: 0.0025\n",
      "Epoch 86/100\n",
      "160/160 [==============================] - 0s 56us/step - loss: 0.0025\n",
      "Epoch 87/100\n",
      "160/160 [==============================] - 0s 61us/step - loss: 0.0025\n",
      "Epoch 88/100\n",
      "160/160 [==============================] - 0s 60us/step - loss: 0.0025\n",
      "Epoch 89/100\n",
      "160/160 [==============================] - 0s 70us/step - loss: 0.0025\n",
      "Epoch 90/100\n",
      "160/160 [==============================] - 0s 64us/step - loss: 0.0025\n",
      "Epoch 91/100\n",
      "160/160 [==============================] - 0s 54us/step - loss: 0.0025\n",
      "Epoch 92/100\n",
      "160/160 [==============================] - 0s 60us/step - loss: 0.0025\n",
      "Epoch 93/100\n",
      "160/160 [==============================] - 0s 72us/step - loss: 0.0025\n",
      "Epoch 94/100\n",
      "160/160 [==============================] - 0s 58us/step - loss: 0.0025\n",
      "Epoch 95/100\n",
      "160/160 [==============================] - 0s 57us/step - loss: 0.0025\n",
      "Epoch 96/100\n",
      "160/160 [==============================] - 0s 62us/step - loss: 0.0025\n",
      "Epoch 97/100\n",
      "160/160 [==============================] - 0s 53us/step - loss: 0.0025\n",
      "Epoch 98/100\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "160/160 [==============================] - 0s 68us/step - loss: 0.0025\n",
      "Epoch 99/100\n",
      "160/160 [==============================] - 0s 52us/step - loss: 0.0025\n",
      "Epoch 100/100\n",
      "160/160 [==============================] - 0s 57us/step - loss: 0.0025\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<keras.callbacks.History at 0x7f0271b8cf28>"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.fit(\n",
    "    x_train, y_train, batch_size=10, epochs=100\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\r",
      "40/40 [==============================] - 0s 447us/step\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "0.002691625151783228"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cost = model.evaluate(x_test, y_test, batch_size=40)\n",
    "cost"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1.9723623],\n",
       "       [2.0929608],\n",
       "       [1.9874371],\n",
       "       [2.0125618],\n",
       "       [1.9623125],\n",
       "       [2.1231105],\n",
       "       [1.9974871],\n",
       "       [2.0276368],\n",
       "       [2.178385 ],\n",
       "       [2.439682 ],\n",
       "       [2.3693328],\n",
       "       [2.4899313],\n",
       "       [1.6959906],\n",
       "       [1.922113 ],\n",
       "       [1.5100677],\n",
       "       [1.7763896],\n",
       "       [1.7462399],\n",
       "       [1.8417138],\n",
       "       [2.4547567],\n",
       "       [2.3241084],\n",
       "       [1.8919632],\n",
       "       [2.4748566],\n",
       "       [2.2688339],\n",
       "       [2.0577865],\n",
       "       [2.3743577],\n",
       "       [1.660816 ],\n",
       "       [1.8668386],\n",
       "       [1.7361901],\n",
       "       [2.4949563],\n",
       "       [2.0678363],\n",
       "       [1.9824122],\n",
       "       [1.7864394],\n",
       "       [2.1180856],\n",
       "       [2.0326617],\n",
       "       [1.917088 ],\n",
       "       [1.5854418],\n",
       "       [1.9924622],\n",
       "       [1.831664 ],\n",
       "       [2.1331606],\n",
       "       [2.0477364]], dtype=float32)"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_pred = model.predict(x_test)\n",
    "y_pred"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAfz0lEQVR4nO3dfZyUdb3/8dcHWGFJZE3QZGUFSyCTlFzFAk/gHYilHLqRTpoaxu90OpWnIlGzzCgwTmkn8xA/M7PMPEeJKFREgdS8BQFREERBZSXxBpTkHj7nj5ldZnaua252r5m5Zvb9fDx4MPO9vnPNx2vWz375zPf7vczdERGRytep3AGIiEg0lNBFRKqEErqISJVQQhcRqRJK6CIiVaJLud64V69e3q9fv3K9vYhIRVqyZMkb7t476FjZEnq/fv1YvHhxud5eRKQimdlLYcdUchERqRI5E7qZ9TWzhWa20syeNbOvh/QbYWbLkn3+Gn2oIiKSTT4llz3AN939KTPrASwxs/nuvrK5g5nVATcCo939ZTM7tEjxiohIiJwjdHff6O5PJR9v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nbfL0ChP28BPXZYGZdgJ4kfp7yeW175HV+MzudxC/Kj7v7zub2kM81igSVMy53fzPl6U0kvjdpfu2IVq9dFEFMecWVYjzwldSGIl6vfITFHsn1quSSy5PA0ZaYoXEAiQ9ujie+YVhIon4NcCEQ1Yh/TvJ8+Zw3o26XTGrNdeuxQOA34cWIy8wObi5ZmFkvYBiwstzXK/nZ/ZFEXfHOVseivF6BPy9Z4v00sCB5feYA4y0xC6Y/cDTwRDtiKTg2MxsC/BI4x903pbQHfq4ljOvwlKfnAKuSj+cBZybjOxg4k/R/rRY1rmRsg0h8wfhoSlsxr1c+5gBfSM52ORl4OzlwieZ6Fevb3vb8Af6ZRA1pJ/AaMC/Z3ge4O6XfGGANid+uV6a0H0Xif7i1wP8CXSOK6xDgAeB54H7gvcn2RuCmlH79SPzG7dTq9QuAFSQS0++AA0sVF/Cx5HsvT/49IQ7XCzgf2A0sS/lzfDGuV9DPC4kSzjnJx92S//1rk9fjqJTXXpl83WrgrCL8zOeK7f7k/wvN12hOrs+1RHFNBZ5Nvv9CYFDKa7+YvJZrgYtLGVfy+dXAtFavK/b1up3ETK3dJHLYBOBfgX9NHjfgF8m4V5Ayiy+K66Wl/yIiVaKSSy4iIpJCCV1EpEoooYuIVAkldBGRKqGELiJSJZTQRUSqhBK6iEiV+D9cElmf80aekwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n",
    "# 画出测试散点图\n",
    "plt.scatter(x_test, y_test)\n",
    "# 画出回归线\n",
    "plt.plot(x_test, y_pred)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
